import request from '/@/utils/request';

export async function queryById(id?: any) {
	return await request({
		url: '/room/area/get/'+id+'',
		method: 'get'
	});
}

export async function queryByOrgan() {
	return await request({
		url: '/room/area/query',
		method: 'post',
		data:{},
	});
}

export async function post(params?: object) {
	return await request({
		url: '/room/area/post',
		method: 'post',
		data: params,
	});
}
export async function put(params?: object) {
	return await request({
		url: '/room/area/put',
		method: 'put',
		data: params,
	});
}
export async function save(params?: object) {
	if (params.id > 0) {
		return await put(params);
	} else {
		return await post(params);
	}
}
export async function del(params?: object) {
	return await request({
		url: '/room/area/delete',
		method: 'delete',
		data:params
	});
}